﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CMN.Entity
{
    ///<summary>
    ///Extend_CollectSetInfoEntity实体类(采集规则设置)
    ///</summary>
    [Serializable]
    public partial class Extend_CollectSetInfoEntity
    {
        #region "Private Variables"
        private DataTableAction _DataTable_Action;  // 操作方法 Insert:增加 Update:修改 Delete:删除
        private Int32 _Id = 0; // 序列
        private String _Name = ""; // 采集名称
        private String _Url = ""; // 采集地址
        private String _Encoding = ""; // 编码
        private String _IncludeStr = ""; // 包含的字符串
        private String _ListMatchLeft = ""; // 内容匹配的左字符串
        private String _ListMatchRight = ""; // 内容匹配的右字符串
        private string _TitleMatchLeft = "";
        private string _TitleMatchRight = "";
        private Int32 _StartNum = 0; // 起始变量值
        private Int32 _EndNum = 0; // 结束变量值
        private Int32 _AddNum = 0; // 递增变量值
        private String _WithoutStr = ""; // 采集列表页不包括
        private bool _Enabled = false; // 是否启用
        private bool _IsAutoUpdate = false; // 是否启用
        
        private Int32 _ChannelId = 0; // 频道Id
        private String _TitleReplaceStr = ""; // 标题中需要替换的旧字符串
        private bool _IsAutoKeyWord = false; // 自否自动获取关键词
        private bool _IsAutoDescription = false; // 是否自动获取简介
        private bool _IsIncludeHtml = false; // 内容中是否包含html
        private String _ContentMatchLeft = ""; // 内容匹配的左字符串
        private String _ContentMatchRight = ""; // 内容匹配的右字符串
        private Int32 _ContentRemoveLeftLength = 0; // 内容匹配值左边不包括的长度
        private Int32 _ContentRemoveRightLength = 0; // 内容匹配值右边不包括长度
        private String _ContentReplaseStr = ""; // 内容中需要替换的旧字符串
        private bool _IsIncludeScript = false; // 是否包含标签Script
        private bool _IsIncludeClass = false; // 是否包含clss样式
        private bool _IsIncludeStyle = false; // 是否包换Style样式
        private bool _IsIncludeColor = false; // 是否包含Color标签
        private bool _IsIncludeLink = false; // 是否包含超链接
        private bool _IsIncludeImg = false; // 是否包含图片
        private bool _IsIncludeFile = false; // 是否包含文件
        private bool _IsIncludeFrame = false; // 是否包含frame框架
        private bool _IsPaging = false; // 内容是否分页
        private bool _IsAutoImg = false;
        private String _PagingReg = ""; // 分页Url正则匹配
        private DateTime? _CollectTime = null; // 
        private String _Cookie = ""; // cookie
        private Int32 _ThreadInterval = 0; // 采集文章线程间隔数（毫秒）
        private Int32 _OrderNum = 0; // 
        private Int32 _DoTime = 0; // 多长时间采集一次
        private string _ChannelName = string.Empty;
        private bool _IsRecommend = false; //是否推荐
        private string _UrlRegex = "";
        private string _ContentEncoding = "";//详细内容页编码
        private string _FormatStr = "";//组装内容字段
        private String _SecondUrlRegex = ""; // 第二页正则地址
        private String _SecondContentRegex = ""; // 第二内容页正则（如果没有填写第二页地址，则第二正则）

        #endregion

        #region "Public Variables"
        ///<summary>
        /// 操作方法 Insert:增加 Update:修改 Delete:删除
        ///</summary>
        public DataTableAction DataTable_Action
        {
            set { this._DataTable_Action = value; }
            get { return this._DataTable_Action; }
        }
        /// <summary>
        /// 序列
        /// </summary>
        public Int32 Id
        {
            set { this._Id = value; }
            get { return this._Id; }
        }
        /// <summary>
        /// 采集名称
        /// </summary>
        public String Name
        {
            set { this._Name = value; }
            get { return this._Name; }
        }
        /// <summary>
        /// 采集地址
        /// </summary>
        public String Url
        {
            set { this._Url = value; }
            get { return this._Url; }
        }
        /// <summary>
        /// 第一页地址
        /// </summary>
        public string FirstUrl
        {
            get;
            set;
        }
        /// <summary>
        /// 编码
        /// </summary>
        public String Encoding
        {
            set { this._Encoding = value; }
            get { return this._Encoding; }
        }
        /// <summary>
        /// 详细内容页编码
        /// </summary>
        public string ContentEncoding
        {
            set { this._ContentEncoding = value; }
            get { return this._ContentEncoding; }
        }
        /// <summary>
        /// 包含的字符串
        /// </summary>
        public String IncludeStr
        {
            set { this._IncludeStr = value; }
            get { return this._IncludeStr; }
        }

        /// <summary>
        /// 列表匹配的左字符串
        /// </summary>
        public String ListMatchLeft
        {
            set { this._ListMatchLeft = value; }
            get { return this._ListMatchLeft; }
        }
        /// <summary>
        /// 列表匹配的右字符串
        /// </summary>
        public String ListMatchRight
        {
            set { this._ListMatchRight = value; }
            get { return this._ListMatchRight; }
        }

        /// <summary>
        /// 列表匹配的左字符串
        /// </summary>
        public String TitleMatchLeft
        {
            set { this._TitleMatchLeft = value; }
            get { return this._TitleMatchLeft; }
        }
        /// <summary>
        /// 列表匹配的右字符串
        /// </summary>
        public String TitleMatchRight
        {
            set { this._TitleMatchRight = value; }
            get { return this._TitleMatchRight; }
        }
        /// <summary>
        /// 起始变量值
        /// </summary>
        public Int32 StartNum
        {
            set { this._StartNum = value; }
            get { return this._StartNum; }
        }
        /// <summary>
        /// 结束变量值
        /// </summary>
        public Int32 EndNum
        {
            set { this._EndNum = value; }
            get { return this._EndNum; }
        }
        /// <summary>
        /// 递增变量值
        /// </summary>
        public Int32 AddNum
        {
            set { this._AddNum = value; }
            get { return this._AddNum; }
        }
        /// <summary>
        /// 采集列表页不包括
        /// </summary>
        public String WithoutStr
        {
            set { this._WithoutStr = value; }
            get { return this._WithoutStr; }
        }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled
        {
            set { this._Enabled = value; }
            get { return this._Enabled; }
        }

        /// <summary>
        /// 是否自动更新
        /// </summary>
        public bool IsAutoUpdate
        {
            set { this._IsAutoUpdate = value; }
            get { return this._IsAutoUpdate; }
        }
        /// <summary>
        /// 频道Id
        /// </summary>
        public Int32 ChannelId
        {
            set { this._ChannelId = value; }
            get { return this._ChannelId; }
        }
        /// <summary>
        /// 频道 名称
        /// </summary>
        public string ChannelName
        {
            set { this._ChannelName = value; }
            get { return this._ChannelName; }
        }
        /// <summary>
        /// 标题中需要替换的旧字符串
        /// </summary>
        public String TitleReplaceStr
        {
            set { this._TitleReplaceStr = value; }
            get { return this._TitleReplaceStr; }
        }
        /// <summary>
        /// 自否自动获取关键词
        /// </summary>
        public bool IsAutoKeyWord
        {
            set { this._IsAutoKeyWord = value; }
            get { return this._IsAutoKeyWord; }
        }
        /// <summary>
        /// 是否自动获取简介
        /// </summary>
        public bool IsAutoDescription
        {
            set { this._IsAutoDescription = value; }
            get { return this._IsAutoDescription; }
        }
        /// <summary>
        /// 内容中是否包含html
        /// </summary>
        public bool IsIncludeHtml
        {
            set { this._IsIncludeHtml = value; }
            get { return this._IsIncludeHtml; }
        }
        /// <summary>
        /// 内容匹配的左字符串
        /// </summary>
        public String ContentMatchLeft
        {
            set { this._ContentMatchLeft = value; }
            get { return this._ContentMatchLeft; }
        }
        /// <summary>
        /// 内容匹配的右字符串
        /// </summary>
        public String ContentMatchRight
        {
            set { this._ContentMatchRight = value; }
            get { return this._ContentMatchRight; }
        }
        /// <summary>
        /// 内容匹配值左边不包括的长度
        /// </summary>
        public Int32 ContentRemoveLeftLength
        {
            set { this._ContentRemoveLeftLength = value; }
            get { return this._ContentRemoveLeftLength; }
        }
        /// <summary>
        /// 内容匹配值右边不包括长度
        /// </summary>
        public Int32 ContentRemoveRightLength
        {
            set { this._ContentRemoveRightLength = value; }
            get { return this._ContentRemoveRightLength; }
        }
        /// <summary>
        /// 内容中需要替换的旧字符串
        /// </summary>
        public String ContentReplaseStr
        {
            set { this._ContentReplaseStr = value; }
            get { return this._ContentReplaseStr; }
        }
        /// <summary>
        /// 是否包含标签Script
        /// </summary>
        public bool IsIncludeScript
        {
            set { this._IsIncludeScript = value; }
            get { return this._IsIncludeScript; }
        }
        /// <summary>
        /// 是否包含clss样式
        /// </summary>
        public bool IsIncludeClass
        {
            set { this._IsIncludeClass = value; }
            get { return this._IsIncludeClass; }
        }
        /// <summary>
        /// 是否包换Style样式
        /// </summary>
        public bool IsIncludeStyle
        {
            set { this._IsIncludeStyle = value; }
            get { return this._IsIncludeStyle; }
        }
        /// <summary>
        /// 是否包含Color标签
        /// </summary>
        public bool IsIncludeColor
        {
            set { this._IsIncludeColor = value; }
            get { return this._IsIncludeColor; }
        }
        /// <summary>
        /// 是否包含超链接
        /// </summary>
        public bool IsIncludeLink
        {
            set { this._IsIncludeLink = value; }
            get { return this._IsIncludeLink; }
        }
        /// <summary>
        /// 是否包含图片
        /// </summary>
        public bool IsIncludeImg
        {
            set { this._IsIncludeImg = value; }
            get { return this._IsIncludeImg; }
        }
        /// <summary>
        /// 是否包含文件
        /// </summary>
        public bool IsIncludeFile
        {
            set { this._IsIncludeFile = value; }
            get { return this._IsIncludeFile; }
        }
        /// <summary>
        /// 是否包含frame框架
        /// </summary>
        public bool IsIncludeFrame
        {
            set { this._IsIncludeFrame = value; }
            get { return this._IsIncludeFrame; }
        }

        /// <summary>
        /// 是否自动提取缩略图
        /// </summary>
        public bool IsAutoImg
        {
            set { this._IsAutoImg=value; }
            get { return this._IsAutoImg; }
        }
        /// <summary>
        /// 内容是否分页
        /// </summary>
        public bool IsPaging
        {
            set { this._IsPaging = value; }
            get { return this._IsPaging; }
        }
        /// <summary>
        /// 是否推荐
        /// </summary>
        public bool IsRecommend
        {
            set { this._IsRecommend = value; }
            get { return this._IsRecommend; }
        }
        /// <summary>
        /// 分页Url正则匹配
        /// </summary>
        public String PagingReg
        {
            set { this._PagingReg = value; }
            get { return this._PagingReg; }
        }
        /// <summary>
        /// 采集列表时间
        /// </summary>
        public DateTime? CollectTime
        {
            set { this._CollectTime = value; }
            get { return this._CollectTime; }
        }

        /// <summary>
        /// 采集内容时间
        /// </summary>
        public DateTime? CollectContentTime
        {
            get;
            set;
        }
        /// <summary>
        /// cookie
        /// </summary>
        public String Cookie
        {
            set { this._Cookie = value; }
            get { return this._Cookie; }
        }
        /// <summary>
        /// 采集文章线程间隔数（秒）
        /// </summary>
        public Int32 ThreadInterval
        {
            set { this._ThreadInterval = value; }
            get { return this._ThreadInterval; }
        }
        /// <summary>
        /// 优先级（优先级100时自动循环更新内容）
        /// </summary>
        public Int32 OrderNum
        {
            set { this._OrderNum = value; }
            get { return this._OrderNum; }
        }
        /// <summary>
        /// 多长时间采集一次
        /// </summary>
        public Int32 DoTime
        {
            set { this._DoTime = value; }
            get { return this._DoTime; }
        }
        /// <summary>
        /// url地址匹配正则
        /// </summary>
        public string UrlRegex
        {
            set { this._UrlRegex = value; }
            get { return this._UrlRegex; }
        }

        /// <summary>
        /// 组装内容
        /// </summary>
        public string FormatStr
        {
            set { this._FormatStr = value; }
            get { return _FormatStr; }
        }
        /// <summary>
        /// 第二页正则地址
        /// </summary>
        public String SecondUrlRegex
        {
            set { this._SecondUrlRegex = value; }
            get { return this._SecondUrlRegex; }
        }
        /// <summary>
        /// 第二内容页正则（如果没有填写第二页地址，则第二正则）
        /// </summary>
        public String SecondContentRegex
        {
            set { this._SecondContentRegex = value; }
            get { return this._SecondContentRegex; }
        }
        #endregion
    }
}
